package proxy.cglib;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class IntermediaryMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        System.out.println("前期准备");
        System.out.println("查找房源");
        System.out.println("和买家沟通时间");
        Object feedback=methodProxy.invokeSuper(o,objects);
        System.out.println("后期跟踪");
        System.out.println("和买家沟通意见");
        return feedback;
    }
}
